/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package intelligenttm;

import intelligenttm.ITMCarto.BaseData;
import intelligenttm.InPutDlg.AddFenQuDlgController;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import me.aviator.entity.MBasemap;
import me.aviator.entity.Ribbon;
import org.w3c.dom.svg.SVGDocument;

/**
 *
 * @author 望舒凌霄
 */
public class SVGCarto extends SVGImage{
    
    private List AttributeList = new ArrayList();//记录导入了多少表格，每个表格是
                                         //一个元素，先这样将就着，以后用字典
    private List<AddFenQuDlgController> SymbolLayerList = new ArrayList();//记录各层符号，一种符号是一层；
    private List<String> SymbolIDList=new ArrayList();
    
    private String BasedSVGPath=null;
    private String BasedSVGName=null;
    
    private Ribbon FenJiRibbon=null;
    private String FenJiAttribute=null;
    private List<BaseData> BDList=null;
    
    //构造函数
    public SVGCarto() throws IOException {
        AttributeList.clear();
        SymbolLayerList.clear();
    }
    
    public SVGCarto(String string) throws IOException {
        super(string); 
        BasedSVGPath=string;
        File tempFile =new File( BasedSVGPath.trim()); 
        BasedSVGName = tempFile.getName();  
    }
    
    public SVGCarto(MBasemap basemap){
        super(basemap.getSvgxml());
        BasedSVGName=basemap.getName();
    }
    
    public SVGCarto(String string,String[][] SArray) throws IOException {
        super(string); 
        AttributeList.clear();
        SymbolLayerList.clear();
        AttributeList.add(SArray);
        BasedSVGPath=string;
        File tempFile =new File( BasedSVGPath.trim()); 
        BasedSVGName = tempFile.getName();   
          
    }
    
    public SVGCarto(SVGDocument document) {
        super(document);
        AttributeList.clear();
        SymbolLayerList.clear();
    }
    
    public SVGCarto(SVGDocument document,String[][] SArray) {
        super(document);
        AttributeList.clear();
        SymbolLayerList.clear();
        AttributeList.add(SArray);
    }
    //方法
    public List getAttributeList(){
        return AttributeList;
    }
    
    public List<AddFenQuDlgController> getSymbolLayerList(){
        return SymbolLayerList;
    }
    
    public String getBasedSVGPath(){
        return BasedSVGPath;
    }
    
    public String getBasedSVGName(){
        return BasedSVGName;
    }
    
    public void addAttributeList(List Attribute){
        AttributeList.add(Attribute);
    }
    public void addSymbolLayerList(AddFenQuDlgController SymbolList){
        SymbolLayerList.add(SymbolList);
    }
    
    public void addSymbolIDList(String ID){
        SymbolIDList.add(ID);
    }
    public void setAttributeList(List NewAttributeList){
        AttributeList=NewAttributeList;
    }
    public void setSymbolLayerList(List<AddFenQuDlgController> NewSymbolLayerList){
        SymbolLayerList=NewSymbolLayerList;
    }
    
    public void setBasedSVGPath(String NewBasedSVGPath){
        BasedSVGPath=NewBasedSVGPath;
        File tempFile =new File( BasedSVGPath.trim()); 
        BasedSVGName = tempFile.getName(); 
    }

    public Ribbon getFenJiRibbon() {
        return FenJiRibbon;
    }

    public void setFenJiRibbon(Ribbon FenJiRibbon) {
        this.FenJiRibbon = FenJiRibbon;
    }

    public String getFenJiAttribute() {
        return FenJiAttribute;
    }

    public void setFenJiAttribute(String FenJiAttribute) {
        this.FenJiAttribute = FenJiAttribute;
    }

    public List<BaseData> getBDList() {
        return BDList;
    }

    public void setBDList(List<BaseData> BDList) {
        this.BDList = BDList;
    }

    public List<String> getSymbolIDList() {
        return SymbolIDList;
    }

    public void setSymbolIDList(List<String> SymbolIDList) {
        this.SymbolIDList = SymbolIDList;
    }
    
    
}
